package com.itheima.blog.admin.controller;


import com.itheima.blog.admin.entity.TBanner;
import com.itheima.blog.admin.service.ITBannerService;
import com.itheima.common.domain.R;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 轮播图设置表 前端控制器
 * </p>
 *
 * @author mm
 * @since 2023-07-11
 */
@RestController
@RequestMapping("/banner")
@RequiredArgsConstructor
@Api(value = "菜单信息相关接口", tags = {"菜单信息相关接口"})
@Slf4j
public class TBannerController {
    private final ITBannerService bannerService;

    @GetMapping("list")
    public R<List<TBanner>> getList() {
        return R.ok(bannerService.list());
    }

}
